﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Entity;
using System.Linq;
using System.Reflection;
using System.Web;
using System.Web.Mvc;
using Bll;
using DAL;
using SimpComm;
using ViewModel;
using log4net;

namespace UI4._0.Areas.adm.Controllers
{ 
    public class AdmUserController : Controller
    {
        private static readonly ILog logger = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
        private readonly AdmService bs = new AdmService();

        //
        // GET: /adm/AdmUser/

        public ViewResult Index()
        {
//            List<AdmUserListModel> datas = bs.SM(new SMP<,>);
//            return View(datas);
            return View();
        }

        //
        // GET: /adm/AdmUser/Details/5

        public ViewResult Details(int id)
        {
            return View();
        }

        //
        // GET: /adm/AdmUser/Create

        public ActionResult Create()
        {
            return View();
        } 

        //
        // POST: /adm/AdmUser/Create

        [HttpPost]
        public ActionResult Create(Adm admuser)
        {
            if (ModelState.IsValid)
            {
                return RedirectToAction("Index");  
            }

            return View(admuser);
        }
        
        //
        // GET: /adm/AdmUser/Edit/5
 
        public ActionResult Edit(int id)
        {
            return View();
        }

        //
        // POST: /adm/AdmUser/Edit/5

        [HttpPost]
        public ActionResult Edit(Adm admuser)
        {
            if (ModelState.IsValid)
            {
                return RedirectToAction("Index");
            }
            return View(admuser);
        }

        //
        // GET: /adm/AdmUser/Delete/5
 
        public ActionResult Delete(int id)
        {
            return View();
        }

        //
        // POST: /adm/AdmUser/Delete/5

        [HttpPost, ActionName("Delete")]
        public ActionResult DeleteConfirmed(int id)
        {            
            return RedirectToAction("Index");
        }

        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);
        }
    }
}